package cn.itcast.bos.quartz;

import java.util.Date;

import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import cn.itcast.bos.service.take_delivery.PromotionService;

/**
 * 自动修改活动状态
 * 
 * @author my
 *
 */
public class PromotionJob implements Job {
	private static final Logger log = Logger.getLogger(PromotionJob.class);

	@Autowired
	private PromotionService promotionService;

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		System.out.println("自动更新活动状态");
		promotionService.updateStatus(new Date());
	}
}
